package com.lgl.scsheader.sameCityChart.controller;

import com.lgl.scsheader.base.controller.BaseController;
import com.lgl.scsheader.sameCityChart.service.OrderOtherChartService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 订单其它统计图表
 */

@RestController
@RequestMapping(value="/orderOtherChart")
public class OrderOtherChartController extends BaseController{
	@Resource(name="orderOtherChartService")
	private OrderOtherChartService orderOtherChartService;

    //今年与去年发布/抢的订单总量折线图，数据格式放在前端处理，可以在一定程度上减轻服务器压力
    @RequestMapping(value = "/listThisLastIssueRobTotal")
    public Object listThisLastIssueRobTotal(){
        return orderOtherChartService.listThisLastIssueRobTotal(getPageData());
    }
    //获取订单各类型的总量
    @RequestMapping(value = "/listTotalGroupType")
    public Object listTotalGroupType(){
        return orderOtherChartService.listTotalGroupType(getPageData());
    }
    //获取订单各类型的总量
    @RequestMapping(value = "/listTotalGroupWeek")
    public Object listTotalGroupWeek(){
        return orderOtherChartService.listTotalGroupWeek(getPageData());
    }
    //获取订单客户端来源的订单总量
    @RequestMapping(value = "/listTotalGroupClient")
    public Object listTotalGroupClient(){
        return orderOtherChartService.listTotalGroupClient(getPageData());
    }
    //获取订单各状态下的总量
    @RequestMapping(value = "/listStatusTotal")
    public Object listStatusTotal(){
        return orderOtherChartService.listStatusTotal(getPageData());
    }
    //获取今年各类型订单总量数据集
    @RequestMapping(value = "/listMonthOrderTypeTotal")
    public Object listMonthOrderTypeTotal(){
        return orderOtherChartService.listMonthOrderTypeTotal(getPageData());
    }
    //获取每个月从下单到抢单、抢单到完成订单所花的平均天数
    @RequestMapping(value = "/listMonthIssueRobDay")
    public Object listMonthIssueRobDay(){
        return orderOtherChartService.listMonthIssueRobDay(getPageData());
    }
}